package demo.tellurium.module

import org.telluriumsource.dsl.DslContext;

import demo.tellurium.framework.BaseUIModule;

class TreeGridModule extends BaseUIModule {

    public String url = "http://9.186.10.174:8080/DojoSrcDemo/dojox_treegrid_model_querystore.html";

    @Override
    public void defineUi() {
        ui.Container(uid: "treegrid", clocator: [id: "treegrid"], group: "false") {
            Container(uid: "content", clocator: [tag: "div", class: "dojoxGridContent"], group: "false") {
                Container(uid: "row", clocator: [tag: "tr", class: "dojoxGridRowToggle-1"], group: "false") {
                    CheckBox(uid: "checkbox", clocator: [:])
                    Container(uid: "ExpandoCell", clocator: [tag: "td", class: "dojoxGridCell dojoxGridExpandoCell"], group: "false") {
                        Container(uid: "Expando", clocator: [tag:"div", class: "dojoxGridExpando"], group: "false") {
                            Div(uid: "ExpandoNode", clocator: [class: "dojoxGridExpandoNode"], respond: ["click"])
                        }
                    }
                }
            }
        }
    }


    public void doToggleCell() {
        click "treegrid.content.row.ExpandoCell.Expando.ExpandoNode"
        waitForPageToLoad 30000
        pause 3000
    }
}
